home *** CD-ROM | disk | FTP | other *** search
/ Carousel / CAROUSEL.cdr / mactosh / util / simulare.sit / Simula 4.07 Reference / card_56820.txt < prev    next >
Text File  |  1989-05-02  |  2KB  |  87 lines

  1. -- card: 56820 from stack: in.07 Reference
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 13647
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=13 top=289 right=311 bottom=97
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Statements
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   go to card id 46171
  23. end mouseUp
  24.  
  25.  
  26.  
  27.  
  28. -- part 2 (field)
  29. -- low flags: 00
  30. -- high flags: 0002
  31. -- rect: left=17 top=169 right=237 bottom=291
  32. -- title width / last selected line: 0
  33. -- icon id / first selected line: 0 / 0
  34. -- text alignment: 0
  35. -- font id: 3
  36. -- text size: 10
  37. -- style flags: 0
  38. -- line height: 13
  39. -- part name: 
  40.  
  41.  
  42. -- part 4 (field)
  43. -- low flags: 00
  44. -- high flags: 0002
  45. -- rect: left=290 top=169 right=289 bottom=495
  46. -- title width / last selected line: 0
  47. -- icon id / first selected line: 0 / 0
  48. -- text alignment: 0
  49. -- font id: 3
  50. -- text size: 10
  51. -- style flags: 0
  52. -- line height: 13
  53. -- part name: 
  54.  
  55.  
  56. -- part contents for background part 2
  57. ----- text -----
  58. Prefixed block
  59.  
  60. -- part contents for background part 1
  61. ----- text -----
  62. When the class mechanism is used to contain classes and routines of a package of some sort, one is usually not interested in creating an object of the class. Instead, the class is used as prefix on a block (or on another class which in turn is used as prefix on a block, if one wishes to specialize the package further.
  63.  
  64. The class which is used as prefix must be supplied with actual parameters. Example:
  65.  
  66. -- part contents for card part 2
  67. ----- text -----
  68. class DrawingPrimitives(ScreenWidth,ScreenHeight); integer ScreenWidth,ScreenHeight;
  69. begin
  70.    ! -- routines for drawing on a screen;
  71. end;
  72.  
  73.  
  74.  
  75.  
  76.  
  77. -- part contents for card part 4
  78. ----- text -----
  79. begin
  80.    class DrawingPrimitives...;
  81.    DrawingPrimitives(600,400)
  82.    begin
  83.       ! -- here all drawing routines are
  84.               accessible. ScreenWidth=600,
  85.               ScreenHeight=400;
  86.    end;
  87. end